package net.crowdloud.client.user;

import java.util.List;

import net.crowdloud.client.GlobalVariables;
import net.crowdloud.shared.entities.User;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;

/** 
 * TODO: Do not show the email on the list.
 * 
 * @TODO 
 */

public class ListUsers {

	public ListUsers(final String group) {

		final UserDatabaseServerCallsAsync databaseServerCalls = GWT
				.create(UserDatabaseServerCalls.class);

		databaseServerCalls.listUsers(new AsyncCallback<List<User>>() {

			public void onSuccess(List<User> users) {

				GlobalVariables.users = users;
			}

			public void onFailure(Throwable caught) {
				// Show the RPC error message to the user

			}

		});

	}

}
